package cn.ronghuanet.gift.doc;

import lombok.Data;
import org.springframework.data.annotation.Id;
import org.springframework.data.elasticsearch.annotations.Document;
import org.springframework.data.elasticsearch.annotations.Field;
import org.springframework.data.elasticsearch.annotations.FieldType;

import java.math.BigDecimal;
import java.util.Date;

@Data
@Document(indexName = "ronghua-gift", type = "gift")
public class GoodsSpuOnsaleDetailDoc {
    @Id
    private Long id;
    @Field(type = FieldType.Long)
    private Long spu_id;
    @Field(type = FieldType.Keyword)
    private String cover;
    @Field(type = FieldType.Text, analyzer = "ik_smart"
            , searchAnalyzer = "ik_smart")
    private String name;
    @Field(type = FieldType.Long)
    private Long tenantId;
    @Field(type = FieldType.Text, analyzer = "ik_smart"
            , searchAnalyzer = "ik_smart")
    private String tanantName;

    @Field(type = FieldType.Long)
    private Long typeId;
    @Field(type = FieldType.Text, analyzer = "ik_smart"
            , searchAnalyzer = "ik_smart")
    private String typeName;

    @Field(type = FieldType.Long)
    private Long brandId;
    @Field(type = FieldType.Text, analyzer = "ik_smart"
            , searchAnalyzer = "ik_smart")
    private String brandName;

    @Field(type = FieldType.Integer)
    private Integer comment_count;
    @Field(type = FieldType.Integer)
    private Integer sale_count;
    @Field(type = FieldType.Date)
    private Date onsale_time;
    @Field(type = FieldType.Date)
    private Date offsale_time;
    @Field(type = FieldType.Double)
    private BigDecimal max_price;
    @Field(type = FieldType.Double)
    private BigDecimal min_price;

    @Field(type = FieldType.Keyword)
    private String spec_properties;
    @Field(type = FieldType.Keyword)
    private String sku_properties;

}